Passed
Pull Request — master (#105)
by Mathieu
32:46
created

DownloadFileQueryHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 10
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A execute 0 3 1
1
import {Inject} from '@nestjs/common';
2
import {QueryHandler} from '@nestjs/cqrs';
3
import {IFileRepository} from 'src/Domain/File/Repository/IFileRepository';
4
import {DownloadFileQuery} from './DownloadFileQuery';
5
6
@QueryHandler(DownloadFileQuery)
7
export class DownloadFileQueryHandler {
8
  constructor(
9
    @Inject('IFileRepository')
10
    private readonly fileRepository: IFileRepository
11
  ) {}
12
13
  public async execute(query: DownloadFileQuery): Promise<void> {
14
    const file = await this.fileRepository.findOneById(query.id);
15
  }
16
}
17